import { createApp } from 'vue'

import { TUIComponents, TUICore, genTestUserSig } from '../TUIKit'
// import TUICallKit
import { TUICallKit } from '@tencentcloud/call-uikit-vue'

const SDKAppID = 1600004502 // Your SDKAppID
const secretKey =
  '1f36b505d9d9036278a9fc5a7d70b7adcb05913c51a2fd53b77dacb081eb1885' //Your secretKey
const userID = '2' // User ID
// init TUIKit
const TUIKit = TUICore.init({
  SDKAppID,
})
// TUIKit add TUIComponents
TUIKit.use(TUIComponents)
// TUIKit add TUICallKit
TUIKit.use(TUICallKit)

// login TUIKit
TUIKit.login({
  userID: userID,
  userSig: genTestUserSig({
    SDKAppID,
    secretKey,
    userID,
  }).userSig,
});
// app.use(TUIKit)
export function setupChat(app) {
  app.use(TUIKit);
}